\(\int (d \tan (e+f x))^m (b (c \tan (e+f x))^n)^p \, dx\) [410]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 25, antiderivative size = 74 \[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {\operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (1+m+n p),\frac {1}{2} (3+m+n p),-\tan ^2(e+f x)\right ) \tan (e+f x) (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p}{f (1+m+n p)} \]

[Out]

hypergeom([1, 1/2*n*p+1/2*m+1/2],[1/2*n*p+1/2*m+3/2],-tan(f*x+e)^2)*tan(f*x+e)*(d*tan(f*x+e))^m*(b*(c*tan(f*x+
e))^n)^p/f/(n*p+m+1)

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3659, 20, 3557, 371} \[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {\tan (e+f x) (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (m+n p+1),\frac {1}{2} (m+n p+3),-\tan ^2(e+f x)\right )}{f (m+n p+1)} \]

[In]

Int[(d*Tan[e + f*x])^m*(b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Hypergeometric2F1[1, (1 + m + n*p)/2, (3 + m + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]*(d*Tan[e + f*x])^m*(b*(c
*Tan[e + f*x])^n)^p)/(f*(1 + m + n*p))

Rule 20

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[b^IntPart[n]*((b*v)^FracPart[n]/(a^IntPart[n]
*(a*v)^FracPart[n])), Int[u*(a*v)^(m + n), x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n]
&&  !IntegerQ[m + n]

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 3557

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rule 3659

Int[((c_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol]
 :> Dist[c^IntPart[n]*((c*(d*Tan[e + f*x])^p)^FracPart[n]/(d*Tan[e + f*x])^(p*FracPart[n])), Int[(a + b*Tan[e
+ f*x])^m*(d*Tan[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[n] &&  !Intege
rQ[m]

Rubi steps \begin{align*} \text {integral}& = \left ((c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p\right ) \int (c \tan (e+f x))^{n p} (d \tan (e+f x))^m \, dx \\ & = \left ((c \tan (e+f x))^{-m-n p} (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p\right ) \int (c \tan (e+f x))^{m+n p} \, dx \\ & = \frac {\left (c (c \tan (e+f x))^{-m-n p} (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p\right ) \text {Subst}\left (\int \frac {x^{m+n p}}{c^2+x^2} \, dx,x,c \tan (e+f x)\right )}{f} \\ & = \frac {\operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (1+m+n p),\frac {1}{2} (3+m+n p),-\tan ^2(e+f x)\right ) \tan (e+f x) (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p}{f (1+m+n p)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00 \[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {\operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (1+m+n p),\frac {1}{2} (3+m+n p),-\tan ^2(e+f x)\right ) \tan (e+f x) (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p}{f (1+m+n p)} \]

[In]

Integrate[(d*Tan[e + f*x])^m*(b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Hypergeometric2F1[1, (1 + m + n*p)/2, (3 + m + n*p)/2, -Tan[e + f*x]^2]*Tan[e + f*x]*(d*Tan[e + f*x])^m*(b*(c
*Tan[e + f*x])^n)^p)/(f*(1 + m + n*p))

Maple [F]

\[\int \left (d \tan \left (f x +e \right )\right )^{m} \left (b \left (c \tan \left (f x +e \right )\right )^{n}\right )^{p}d x\]

[In]

int((d*tan(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x)

[Out]

int((d*tan(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x)

Fricas [F]

\[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\int { \left (\left (c \tan \left (f x + e\right )\right )^{n} b\right )^{p} \left (d \tan \left (f x + e\right )\right )^{m} \,d x } \]

[In]

integrate((d*tan(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x, algorithm="fricas")

[Out]

integral(((c*tan(f*x + e))^n*b)^p*(d*tan(f*x + e))^m, x)

Sympy [F]

\[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\int \left (b \left (c \tan {\left (e + f x \right )}\right )^{n}\right )^{p} \left (d \tan {\left (e + f x \right )}\right )^{m}\, dx \]

[In]

integrate((d*tan(f*x+e))**m*(b*(c*tan(f*x+e))**n)**p,x)

[Out]

Integral((b*(c*tan(e + f*x))**n)**p*(d*tan(e + f*x))**m, x)

Maxima [F]

\[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\int { \left (\left (c \tan \left (f x + e\right )\right )^{n} b\right )^{p} \left (d \tan \left (f x + e\right )\right )^{m} \,d x } \]

[In]

integrate((d*tan(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x, algorithm="maxima")

[Out]

integrate(((c*tan(f*x + e))^n*b)^p*(d*tan(f*x + e))^m, x)

Giac [F]

\[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\int { \left (\left (c \tan \left (f x + e\right )\right )^{n} b\right )^{p} \left (d \tan \left (f x + e\right )\right )^{m} \,d x } \]

[In]

integrate((d*tan(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x, algorithm="giac")

[Out]

integrate(((c*tan(f*x + e))^n*b)^p*(d*tan(f*x + e))^m, x)

Mupad [F(-1)]

Timed out. \[ \int (d \tan (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\int {\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^m\,{\left (b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\right )}^p \,d x \]

[In]

int((d*tan(e + f*x))^m*(b*(c*tan(e + f*x))^n)^p,x)

[Out]

int((d*tan(e + f*x))^m*(b*(c*tan(e + f*x))^n)^p, x)